import Vue from 'vue'
import {ErrorLogModule} from '@/store/modules/error-log'
import settings from '@/settings'

const {errorLog: needErrorLog} = settings

const checkNeed = () => {
    const env = process.env.NODE_ENV
    return false
}

if (checkNeed()) {
    Vue.config.errorHandler = function (err, vm, info) {
        ErrorLogModule.AddErrorLog({
            err,
            vm,
            info,
            url: window.location.href
        })
    }
}
